import cn.kongwg.config.SpringConfig;
import cn.kongwg.service.UserService;
import com.sun.glass.ui.Application;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author kongwg
 * @create 2021-02-19 17:49
 */
public class MyTest2 {

    @Test
    public void test(){
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);

        UserService userService = context.getBean("userService", UserService.class);

        userService.add();
    }
}
